package com.aaa.entity;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "class", schema = "trainingdb", catalog = "")
public class ClassEntity {
    private int classid;
    private Integer courseid;
    private String classname;
    private Byte classstate;
    private Integer progressing;
    private Integer limitnum;
    private Integer acnumber;
    private Date opentime;
    private Date endtime;
    private String classroom;
    private String teacher;
    private String remark;

    @Id
    @Column(name = "班级id")
    public int getClassid() {
        return classid;
    }

    public void setClassid(int 班级Id) {
        this.classid = 班级Id;
    }

    @Basic
    @Column(name = "courseid")
    public Integer getCourseid() {
        return courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    @Basic
    @Column(name = "classname")
    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname;
    }

    @Basic
    @Column(name = "classstate")
    public Byte getClassstate() {
        return classstate;
    }

    public void setClassstate(Byte classstate) {
        this.classstate = classstate;
    }

    @Basic
    @Column(name = "progressing")
    public Integer getProgressing() {
        return progressing;
    }

    public void setProgressing(Integer progressing) {
        this.progressing = progressing;
    }

    @Basic
    @Column(name = "limitnum")
    public Integer getLimitnum() {
        return limitnum;
    }

    public void setLimitnum(Integer limitnum) {
        this.limitnum = limitnum;
    }

    @Basic
    @Column(name = "acnumber")
    public Integer getAcnumber() {
        return acnumber;
    }

    public void setAcnumber(Integer acnumber) {
        this.acnumber = acnumber;
    }

    @Basic
    @Column(name = "opentime")
    public Date getOpentime() {
        return opentime;
    }

    public void setOpentime(Date opentime) {
        this.opentime = opentime;
    }

    @Basic
    @Column(name = "endtime")
    public Date getEndtime() {
        return endtime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    @Basic
    @Column(name = "classroom")
    public String getClassroom() {
        return classroom;
    }

    public void setClassroom(String classroom) {
        this.classroom = classroom;
    }

    @Basic
    @Column(name = "teacher")
    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ClassEntity that = (ClassEntity) o;
        return classid == that.classid &&
                Objects.equals(courseid, that.courseid) &&
                Objects.equals(classname, that.classname) &&
                Objects.equals(classstate, that.classstate) &&
                Objects.equals(progressing, that.progressing) &&
                Objects.equals(limitnum, that.limitnum) &&
                Objects.equals(acnumber, that.acnumber) &&
                Objects.equals(opentime, that.opentime) &&
                Objects.equals(endtime, that.endtime) &&
                Objects.equals(classroom, that.classroom) &&
                Objects.equals(teacher, that.teacher) &&
                Objects.equals(remark, that.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(classid, courseid, classname, classstate, progressing, limitnum, acnumber, opentime, endtime, classroom, teacher, remark);
    }
}
